package com.esri.core.symbol;

import android.graphics.Color;
import com.esri.core.internal.util.d;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonNode;

/* loaded from: classes.dex */
public abstract class LineSymbol implements Symbol {
    private static final long serialVersionUID = 1;
    int a;
    float b;
    boolean c;

    public LineSymbol(JsonNode jsonNode) throws Exception {
        int argb = Color.argb(255, 0, 255, 0);
        this.a = argb;
        this.c = true;
        this.a = d.b(jsonNode, "color", argb);
        this.b = d.a(jsonNode, "width", this.b);
    }

    public LineSymbol() {
        this.a = Color.argb(255, 0, 255, 0);
        this.c = true;
    }

    public int getColor() {
        return this.a;
    }

    public LineSymbol setColor(int i) {
        this.a = i;
        return this;
    }

    public float getWidth() {
        return this.b;
    }

    public LineSymbol setWidth(float f) {
        this.b = f;
        return this;
    }

    public int getAlpha() {
        return Color.alpha(this.a);
    }

    public LineSymbol setAlpha(int i) {
        this.a = (i << 24) | (this.a & 16777215);
        return this;
    }

    public boolean isAntiAlias() {
        return this.c;
    }

    public LineSymbol setAntiAlias(boolean z) {
        this.c = z;
        return this;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public void a(JsonGenerator jsonGenerator) throws Exception {
        d.b(jsonGenerator, "color", this.a);
        d.a(jsonGenerator, "width", this.b);
    }

    public int hashCode() {
        return (((((this.c ? 1231 : 1237) + 31) * 31) + this.a) * 31) + Float.floatToIntBits(this.b);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj != null && getClass() == obj.getClass()) {
            LineSymbol lineSymbol = (LineSymbol) obj;
            return this.c == lineSymbol.c && this.a == lineSymbol.a && this.b == lineSymbol.b;
        }
        return false;
    }
}
